Skip to content

Fix React Server Components RCE vulnerability#6

Merged
pantharshit007 merged 1 commit intomainfrom
vercel/dependencies-for-react-flight-jht6eh
Dec 8, 2025
Merged

Fix React Server Components RCE vulnerability#6
pantharshit007 merged 1 commit intomainfrom
vercel/dependencies-for-react-flight-jht6eh

Conversation

@vercel
Copy link
Contributor

@vercel vercel bot commented Dec 8, 2025

Important

This is an automatic PR generated by Vercel to help you with patching efforts. We can't guarantee it's comprehensive, and it may contain mistakes. Please review our guidance before merging these changes.

A critical remote code execution (RCE) vulnerability in React Server Components, impacting frameworks such as Next.js, was identified in the project gymetry. The vulnerability enables unauthenticated RCE on the server via insecure deserialization in the React Flight protocol.

This issue is tracked under:

This automated pull request upgrades the affected React and Next.js packages to patched versions that fully remediate the issue.

More Info | security@vercel.com

## React Flight / Next.js RCE Advisory Security Update

### Vulnerability Assessment

The project was scanned for vulnerability to the React Flight / Next.js Remote Code Execution (RCE) advisory.

**Detection Results:**
- ✅ **Next.js Detected**: The project uses `next@15.0.1` (vulnerable version in 15.0.x range)
- ❌ **React Flight Packages**: Not used (no react-server-dom-webpack, react-server-dom-parcel, or react-server-dom-turbopack)
- ℹ️ **React Version**: Uses React 18.3.1 (not affected by React 19 vulnerability)

### Changes Made

Since the project uses Next.js 15.0.x (an affected version range), the following security update was applied:

**Modified Files:**
1. `package.json`
   - Updated `next` from `^15.0.1` to `15.0.5` (patched version for 15.0.x series)

2. `pnpm-lock.yaml`
   - Updated lockfile to resolve to Next.js 15.0.5 and its dependencies

### Implementation Details

According to the React Flight / Next.js RCE advisory patched version requirements:
- For Next.js 15.0.x → upgrade to **15.0.5**

The patched version was selected and installed. No changes were needed for React or React DOM as Next.js automatically supplies the correct versions.

### Verification

✅ **Build Verification**: Successfully ran `pnpm run build` with Next.js 15.0.5
- All 19 routes compiled successfully
- No build errors or dependency conflicts
- Lockfile properly resolved to patched version

✅ **Dependency Installation**: Ran `pnpm install` to update lockfile
- All dependencies resolved correctly
- Lockfile reflects Next.js 15.0.5 pinned version

### Non-Affected Dependencies

The following packages were NOT modified as they are not vulnerable:
- `react@18.3.1` - React 18.x is not affected by the RCE advisory
- `react-dom@18.3.1` - React DOM 18.x is not affected
- All other dependencies remain unchanged

### Summary

This repository was vulnerable to the React Flight / Next.js RCE advisory due to its use of Next.js 15.0.1. The project has been successfully patched by upgrading to Next.js 15.0.5. The build completes successfully with the patched version, confirming compatibility and security resolution.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@vercel
Copy link
Contributor Author

vercel bot commented Dec 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
gymetry Ready Ready Preview Comment Dec 8, 2025 9:53pm

@coderabbitai
Copy link

coderabbitai bot commented Dec 8, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@pantharshit007 pantharshit007 marked this pull request as ready for review December 8, 2025 21:53
@pantharshit007 pantharshit007 merged commit 773d1fb into main Dec 8, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant